package com.ruoyi.consume.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.consume.mapper.GraftinglabelConsumeMapper;
import com.ruoyi.consume.domain.GraftinglabelConsume;
import com.ruoyi.consume.service.IGraftinglabelConsumeService;

/**
 * 查看领用信息Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-23
 */
@Service
public class GraftinglabelConsumeServiceImpl implements IGraftinglabelConsumeService
{
    @Autowired
    private GraftinglabelConsumeMapper graftinglabelConsumeMapper;

    /**
     * 查询查看领用信息
     *
     * @param graftinglabelConsumeId 查看领用信息ID
     * @return 查看领用信息
     */
    @Override
    public GraftinglabelConsume selectGraftinglabelConsumeById(Long graftinglabelConsumeId)
    {
        return graftinglabelConsumeMapper.selectGraftinglabelConsumeById(graftinglabelConsumeId);
    }

    /**
     * 查询查看领用信息列表
     *
     * @param graftinglabelConsume 查看领用信息
     * @return 查看领用信息
     */
    @Override
    public List<GraftinglabelConsume> selectGraftinglabelConsumeList(GraftinglabelConsume graftinglabelConsume)
    {
        return graftinglabelConsumeMapper.selectGraftinglabelConsumeList(graftinglabelConsume);
    }

    /**
     * 新增查看领用信息
     *
     * @param graftinglabelConsume 查看领用信息
     * @return 结果
     */
    @Override
    public int insertGraftinglabelConsume(GraftinglabelConsume graftinglabelConsume)
    {
        graftinglabelConsume.setCreateTime(DateUtils.getNowDate());
        return graftinglabelConsumeMapper.insertGraftinglabelConsume(graftinglabelConsume);
    }

    /**
     * 修改查看领用信息
     *
     * @param graftinglabelConsume 查看领用信息
     * @return 结果
     */
    @Override
    public int updateGraftinglabelConsume(GraftinglabelConsume graftinglabelConsume)
    {
        graftinglabelConsume.setUpdateTime(DateUtils.getNowDate());
        return graftinglabelConsumeMapper.updateGraftinglabelConsume(graftinglabelConsume);
    }

    /**
     * 批量删除查看领用信息
     *
     * @param graftinglabelConsumeIds 需要删除的查看领用信息ID
     * @return 结果
     */
    @Override
    public int deleteGraftinglabelConsumeByIds(Long[] graftinglabelConsumeIds)
    {
        return graftinglabelConsumeMapper.deleteGraftinglabelConsumeByIds(graftinglabelConsumeIds);
    }

    /**
     * 删除查看领用信息信息
     *
     * @param graftinglabelConsumeId 查看领用信息ID
     * @return 结果
     */
    @Override
    public int deleteGraftinglabelConsumeById(Long graftinglabelConsumeId)
    {
        return graftinglabelConsumeMapper.deleteGraftinglabelConsumeById(graftinglabelConsumeId);
    }

    /**
     * 获取用户下拉框
     *
     * @param
     * @return 结果
     */
    @Override
    public List<GraftinglabelConsume> getUserName(){
        return graftinglabelConsumeMapper.getUserName();
    }
}
